package com.hehe.conversion.hehemiddleware.controller;


import com.hehe.conversion.hehemiddleware.common.ApiResponse;
import com.hehe.conversion.hehemiddleware.model.req.ImageUploadRequest;
import com.hehe.conversion.hehemiddleware.service.InvoiceProcessingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/api")
public class ImageInfoController {

    @Autowired
    InvoiceProcessingService invoiceProcessingService;

    @RequestMapping(value = "/get_multiple_items_info", method = {RequestMethod.GET, RequestMethod.POST})
    public ApiResponse getMultipleItemsInfo(ImageUploadRequest imageUploadRequest) {
        log.info("ImageInfoController in controller getMultipleItemsInfo");
        return invoiceProcessingService.handleRequest(imageUploadRequest);
    }
}
